package com.aic.aicdetactor.common;

import android.os.Environment;

/**
 * 定义activity 间传递的参数变量信息
 * @author Administrator
 *
 */
public class CommonDef {
	public static String TAG = "luotest";	
	public static String ROUTE_CLASS_NAME = "route_Class";	
	public static String GUID = "guid";
	public enum RouteType{
		//正常巡检
		Route_Normal,
		//特殊巡检
		Route_Spec,
		//临时巡检
		Route_Tmp
	}
	
	/*
	 * 巡检文件存储位置目录
	 */
	public static String PATH_DIRECTOR = "datapathDirector";

	//checkItemData 以*隔开的数据编号
	public class partItemData_Index{
   
    //巡检项目名
    public  final static int PARTITEM_CHECKPOINT_NAME =0;
    //巡检项编号
    public  final static int PARTITEM_CODE =1;
    //数据类型ID
    public  final static int PARTITEM_DATA_TYPE_ID =2;
    //巡检数据种类
    public  final static int PARTITEM_DATA_TYPE =3;
  //测量单位
    public  final static int PARTITEM_MEASUREMENT_UNIT =4;
    //启停状态标识控制码
    public  final static int PARTITEM_START_STOP_STATUS_FLAG =5;
    
    //上限数值
    public  final static int PARTITEM_MAX_VALUE =6;
    
    //中限数值
    public  final static int PARTITEM_MIDDLE_VALUE =7;
    
    //下限数值
    public  final static int PARTITEM_MIN_VALUE =8;
    //发射率
    public  final static int PARTITEM_RF_RATE =9;
    //提示标志
    public  final static int PARTITEM_TIPS_FLAG =10;
    //轴数
    public  final static int PARTITEM_RELAX_COUNT =11;
    //检查方法，格式：目视/手摸/…,用法选几项(始终为空，APP不用处理)
    public  final static int PARTITEM_CHECK_METHOD =12;
   
    /**额外信息
     * 不为空。有两个作用：
	1. 巡检完后的结果值
	  温度、录入、加速度（有效值）、速度（有效值）、位移（有效值）、转速、观察项里的备注、选择”录入项“里某一项、选择“预设状况”里的一项或多项。	
	2.图片，音频，振动波形的文件名也放在此项。
     */
    public  final static int PARTITEM_ADDITIONAL_INFO =13;
    //维修状态
    public  final static int PARTITEM_FIX_STATUS =14; 
    
    //第十八项之后 ，是PartItemData上传数据时添加的项目
    //启停状态 新添加
    public  final static int PARTITEM_ADD_ITEMDEF_18 =18; 
    //开始巡检时间 新添加
    public  final static int PARTITEM_ADD_START_DATE_19 =19; 
    //结束巡检时间  新添加
    public  final static int PARTITEM_ADD_END_DATE_20 =20; 
    //总耗时	添加	整个巡检项耗时，单位S  新添加
    public  final static int PARTITEM_ADD_TIME_DIFF_21 =21; 
   
    
	}
    
	    
	// 以下是巡检项的数据种类
	public class checkUnit_Type{
	
	/**
	两字节，不能空，总共有12种类型，分别为：
		="00", 表示温度。		
		="01", 录入项， 		
		="02", 测量，只能输入数字，小数点，正负号，如压力、流量等。		
		="03"，表示测量加速度		
		="04"，表示测量速度		
		="05"，表示测量位移		
		="06"，表示测量转速		
		="07"，表示预设状况项， 		
		="08"，表示图片		
		="09"，表示音频		
		="10"，表示观察
		在APP端自动启动照相、音频、备注。		
		="11",  振动波形		
		注：8,9,11类型在下载的JSON格式里不存在
	 */
		/**
		 * 1.温度   ，Code= "00"；
			2.录入   ，Code= "01"；
			3.抄表   ，Code= "02"；
			4.加速度 ，Code= "03"；
			5.速度   ，Code= "04"；
			6.位移   ，Code= "05"；
			7.转速    ，Code="06"；
			8.预设状况，Code= "07"；
			9.图片   ，Code= "08"；
			10.音频   ，Code="09"；
			11.观察 ，Code="10"；
			12.振动波形 ，Code=11.

			图片、音频、振动波形在上位机编辑时不用出现
		 */

	/**
	 *  温度
	 */
	public static final int TEMPERATURE = 0;
	/**
	 *  录入项
	 */
	public static final int ENTERING = 1;
	/**
	 *  抄表，只能输入数字，小数点，正负号，如压力、流量等。	
	 */
	public static final int METER_READING = 2;	
	/**
	 *  加速度
	 */
	public static final int ACCELERATION = 3;
	/**
	 *  速度
	 */
	public static final int SPEED = 4;
	/**
	 *  位移
	 */
	public static final int  DISPLACEMENT =5;
	/**
	 *  转速
	 */
	public static final int ROTATION_RATE = 6;
	/**
	 *  预设状况项
	 */
	public static final int STATE_PRESUPPOSITOIN=7;
	/**
	 *  图片
	 */
	public static final int PICTURE = 8;
	/**
	 *  音频
	 */
	public static final int AUDIO = 9;
	/**
	 *  观察
	 */
	public static final int OBSERVATION = 10;
	/**
	 *  振动矢量波形  Vibration vector wave
	 */
	public static final int SHOCK_VECTOR = 11;
	}
	/**
	 * 
	 * @author Administrator
	 *
	 */
	
	public class turn_info {
		public static final String JSON_INDEX = "1";
	}

	public class worker_info {
		public static final String JSON_INDEX = "2";
	}

	public class route_info {
		public static final String NAME = "Route_Name";
		public static final String INDEX = "Route_Index";
		public static final String LISTVIEW_ITEM_INDEX = "Route_ListView_ItemIndex";
		public static final String DEADLINE = "Route_DeadLine";
		//public static final String STATUS = "Route_Check_Status";
		public static final String PROGRESS = "Route_Progress";
		public static final String JSON_INDEX = "7";
		public static final String IsSpecilaLine = "Is_SpecilaLine";
		public static final String Path = "Path";

	}

	public class station_info {
		public static final String NAME = "Station_Name";
		public static final String INDEX = "Station_Index";
		public static final String LISTVIEW_ITEM_INDEX = "Station_ListView_Item";
		public static final String DEADLINE = "Station_DeadLine";
		//public static final String STATUS = "Station_Check_Status";
		public static final String PROGRESS = "Station_Progress";
		public static final String JSON_INDEX = "4";

	}
	
	public class organization_info{
		public static final String JSON_INDEX = "3";
	}

	public class device_info {
		public static final String NAME = "Device_Name";
		public static final String INDEX = "Device_Index";
		public static final String LISTVIEW_ITEM_INDEX = "Device_ListView_Item";
		public static final String DEADLINE = "Device_DeadLine";
		public static final String STATUS = "Device_Check_Status";
		public static final String PROGRESS = "Device_Progress";
	}

	public class check_unit_info {
		public static final String NAME = "CheckUnit_Name";
		public static final String INDEX = "CheckUnit_Index";
		public static final String LISTVIEW_ITEM_INDEX = "CheckUnit_ListView_Item";
		public static final String DEADLINE = "CheckUnit_DeadLine";
		public static final String STATUS = "CheckUnit_Check_Status";
		public static final String PROGRESS = "CheckUnit_Progress";
	}

	public class check_item_info {
		public static final String NAME = "CheckItem_Name";
		//public static final String UNIT_NAME = "CheckUnit_Name";
		public static final String DATA_TYPE = "CheckItem_Type";
		public static final String VALUE = "CheckItem_Value";
		public static final String INDEX = "CheckItem_Index";
		public static final String LISTVIEW_ITEM_INDEX = "CheckItem_ListView_Item";
		
		public static final String STATUS = "CheckItem_Check_Status";
		public static final String PROGRESS = "CheckItem_Progress";
		public static final String IS_REVERSE_CHECKING = "is_reverse_checking";
		public static final String DEADLINE = "CheckItem_DeadLine";
		public static final String ISCHECKED = "IsChecked";
		public static final String CHECKED_RESULT = "Value";
		public static final String ITEM_COUNTS= "counts";
	}
	
	public class PartItemData_Shered_info {
		public static final String Time = "shered_Time";
		public static final String Content = "Shered_Content";
	}
	
	
	public class Temporary_Check_info {
		public static final String type = "type";
		public static final String past_time = "past_tiem";
		public static final String receive_date = "receive_date";
		public static final String title = "title";
	}
	
	
	
	public static final int  FILE_TYPE_PICTRUE  =0;
	public static final int  FILE_TYPE_AUDIO  =1;
	public static final int  FILE_TYPE_TEXTRECORD  =2;
	public static final int  FILE_TYPE_WORKER  =3;
	public static final int  FILE_TYPE_OriginaJson  =4;
	public static final int  FILE_TYPE_UploadJson  =5;
	public static final int  FILE_TYPE_BaseSetting  =6;//2016-03-25 liuhg添加
	public static final String AUDIO_PATH= "audioPath";
	public static final String TEXT_RECORD_PATH= "textPath";
	
	public final static String MEASURMENT_MODE="MEASUREMENTMODE";//2016-04-15 liuhg添加
	public static final int  MEASURMENT_MODE_SAVEPOWER  =1;//2016-04-15 liuhg添加
	public static final int  MEASURMENT_MODE_HIGHPERFORMANCE  =2;//2016-04-15 liuhg添加
	
	public class APP_Settings {
		public static final String ServiceIP="ServiceIp";
	}
	
	public static final String GotoNextDevice= "gotoNextDevice";
	
	public class LocalSearch{
		public static final String Name ="Name";
		public static final String Path ="Path";
		public static final String Process ="Process";
		public static final String Date ="Date";
	}
	
	public static final String TMPLineFactoryName= "TMPLineFactoryName";
	public static final String TMPLineDepartmentName= "TMPLineDepartmentName";
	public static final String TMPLineWorkshopName= "TMPLineWorkshopName";
	public static final String TMPLineDeviceName= "TMPLineDeviceName";
	public static final String TMPLineDeviceSN= "TMPLineDeviceSN";
	public static final String TMPLineMeasureName= "TMPLineMeasureName";
	public static final String TMPLineMeasureDataType= "TMPLineMeasureDataType";
	
	public static final int TempuratureCalibrationLowerLimit=-20;
	public static final int TempuratureCalibrationUpperLimit=320;
	public static final int TempuratureCalibrationStepValue=10;
	public static final int TempuratureAllowDifferenceValue=10;
	public static final int InvalidValue=-1000;
	public static final String TempuratureCalbFinish="(已校完)";
	/**
	 * 根目录
	 */
	public static final String FilePath="/AIC8600/";
	/**
	 * 日志保存位置
	 */
	public static final String LogPath="Log/";
	public static final String RootPath = Environment.getExternalStorageDirectory()+ FilePath;;
}
